<?php /* @var $this Controller */ ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />
    <title><?php echo Yii::t('header','RMMS'); ?></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta name="description" content="<?php echo Yii::t('header','Ganzi Water construction site remote monitoring and management system'); ?>">
    <meta name="author" content="<?php echo Yii::t('header','Coy QIU - Fireals Limited'); ?>">

    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/styles.css" />
    
	<title><?php echo CHtml::encode($this->pageTitle); ?></title>

</head>

<body>

<?php $this->widget('bootstrap.widgets.TbNavbar',array(
	    'items'=>array(
	        array(
	            'class'=>'bootstrap.widgets.TbMenu',
	            'items'=>array(
	            	array('label'=>Yii::t('common','Home'), 'url'=>array('/site/index'), 'visible'=>!Yii::app()->user->isGuest),
	            	array('label'=>Yii::t('common','Live'), 'url'=>array('/live/index'), 'visible'=>!Yii::app()->user->isGuest),
//	            	array('label'=>Yii::t('common','Snapshot'), 'url'=>array('/snapshot/index'), 'visible'=>!Yii::app()->user->isGuest),
					array('url'=>Yii::app()->getModule('user')->loginUrl, 'label'=>Yii::app()->getModule('user')->t("Login"), 'visible'=>Yii::app()->user->isGuest),
					array('url'=>array('/user/admin/admin'), 'label'=>Yii::app()->getModule('user')->t("Manage Users"), 'visible'=>Yii::app()->user->isAdmin()),
					array('url'=>Yii::app()->getModule('user')->logoutUrl, 'label'=>Yii::app()->getModule('user')->t("Logout").' ('.Yii::app()->user->name.')', 'visible'=>!Yii::app()->user->isGuest),

// 	                array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),	                
// 	                array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
// 	                array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest)
	            ),
	        ),
	    ),
)); ?>

<div class="container" id="page">

	<?php if(isset($this->breadcrumbs)):?>
		<?php $this->widget('bootstrap.widgets.TbBreadcrumbs', array(
			'links'=>$this->breadcrumbs,
		)); ?><!-- breadcrumbs -->
	<?php endif?>

	<?php echo $content; ?>

	<div class="clear"></div>

	<hr>
	<div id="footer">
		<p class="text-center muted">
			Copyright &copy; <?php echo date('Y'); ?> by Fireals Limited, All Rights Reserved.<br/>
			<?php echo "Fireals有限公司(香港)" ?>
		</p>
	</div><!-- footer -->

</div><!-- page -->

</body>
</html>
